﻿<phone:PhoneApplicationPage x:Class="Shell.phone.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:map="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
                            xmlns:mapCore="clr-namespace:Microsoft.Phone.Controls.Maps.Core;assembly=Microsoft.Phone.Controls.Maps"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:my="clr-namespace:NokiaMapSDK;assembly=NokiaMapSDK"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            d:DesignHeight="696"
                            d:DesignWidth="480"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            SupportedOrientations="Portrait"
                            mc:Ignorable="d">
    <phone:PhoneApplicationPage.Resources>
        <map:ApplicationIdCredentialsProvider x:Key="GoogleCredentialsKey" ApplicationId="Av4N4Ckc5SZlw24lqoifaZXnVOYse1Ly5A3wJHG24RNqjyoswZSvxTYqWA4e5_WE" />
        <map:ApplicationIdCredentialsProvider x:Key="BaiduCredentialsKey" ApplicationId="fadbdb72096bc7a4d8c1a06e6dc95425" />
    </phone:PhoneApplicationPage.Resources>

    <!--  LayoutRoot 是包含所有页面内容的根网格  -->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--  ContentPanel - 在此处放置其他内容  -->
        <Grid x:Name="ContentPanel">
            <my:NokiaMapControl Name="nokiaMapControl1">
                <toolkit:GestureService.GestureListener>
                    <toolkit:GestureListener DragDelta="GestureListener_DragDelta" PinchDelta="GestureListener_PinchDelta" />
                </toolkit:GestureService.GestureListener>
            </my:NokiaMapControl>

            <Border Height="70"
                    VerticalAlignment="Top"
                    Background="Blue">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="auto" />
                    </Grid.ColumnDefinitions>
                    <TextBox x:Name="txtSearch"/>
                    <Button Grid.Column="1" Content="查找" 
                            Click="Button_Click_1"/>
                    <Button Grid.Column="2"
                            Click="Button_Click"
                            Content="GPS" />
                </Grid>
            </Border>
        </Grid>
    </Grid>

    <!--  演示 ApplicationBar 用法的示例代码  -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsMenuEnabled="True"
                              IsVisible="True"
                              Mode="Minimized">

            <!--
                <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="按钮 1" />
                <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="按钮 2" />
            -->

            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="收藏夹" />
                <shell:ApplicationBarMenuItem Text="工具" />
                <shell:ApplicationBarMenuItem Text="下载地图数据" />
                <shell:ApplicationBarMenuItem Text="设置" />
                <shell:ApplicationBarMenuItem Text="主题" />
                <shell:ApplicationBarMenuItem Text="应用推荐" />
                <shell:ApplicationBarMenuItem Text="关于" />
                <shell:ApplicationBarMenuItem Text="退出" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>